<!--添加栏目-->
<div class="dialog_content">
	<form id="info_form" action="{:U('Dict/add')}" method="post">
	<table width="100%" class="table_form">
		<tr> 
			<th width="120">选择小区 :</th>
			<td>
				<select class="J_cate_select mr10" data-pid="0" data-uri="{:U('Estate/ajax_getchilds')}" data-selected="{$spid}"></select>
				<input type="hidden" name="estate_id" id="J_cate_id" value="0"/>
				<input type="hidden" name="estate" id="J_name" value=""/>
			</td>
		</tr>
		<tr>
			<th>楼栋 :</th>
			<td><input type="number" name="build"  class="input-text" size="30"></td>
		</tr>
		<tr>
			<th>楼栋别名 :</th>
			<td><input type="text" name="build_name"  class="input-text" size="30"></td>
		</tr>
		<tr>
			<th>楼层 :</th>
			<td><input type="number" name="fool"  class="input-text" size="20"></td>
		</tr>
		<tr>
			<th>楼层别名 :</th>
			<td><input type="text" name="floor_name"  class="input-text" size="20"></td>
		</tr>
        <tr>
			<th>房号 :</th>
            <td><input type="text" name="room" class="input-text"></td>
        </tr>
			<th>房号别名 :</th>
			<td><input type="text" name="room_nama" class="input-text"></td>
		</tr>
		</tr>
			<th>户型 :</th>
			<td>
				<select name="h-type"  class="selectStyle select1" id="h-type">
					<option value="0">请选择</option>
					<volist name="house_type" id="vo">
						<option value="{$vo.id}">{$vo.type_title}</option>
					</volist>
				</select>
				<input type="hidden" name="house_type" class="input-text" id="type-text">
			</td>
		</tr>
		<tr>
			<th>面积 :</th>
			<td><input type="number" name="area" class="input-text"></td>
		</tr>
		</tr>
			<th>详细地址 :</th>
			<td><input type="text" name="addr" class="input-text" ></td>
		</tr>
	</table>
	</form>
</div>
<script src="__JS__/fileuploader.js"></script>
<script>
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#name").formValidator({onshow:lang.please_input+lang.article_cate_name,onfocus:lang.please_input+lang.article_cate_name}).inputValidator({min:1,onerror:lang.please_input+lang.article_cate_name});

	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.status == 1){
			$.dialog.get(result.dialog).close();
			$.pinphp.tip({content:result.msg});
			window.location.reload();
		} else {
			$.pinphp.tip({content:result.msg, icon:'alert'});
		}
	}
	$('.J_cate_select').cate_select();
	$('#h-type').change(function (){
		var text = $(this).find("option:selected").text();
		$('#type-text').val(text);

	});
	

});
</script>